from marshmallow import fields

from gis.common.django_ext.forms import EnumField
from itpay.core.agency.const import ComplaintType
from itpay.server_api.view.base import MchSignRequestSchema


class ListOnlineAgency(MchSignRequestSchema):
    mch_id = fields.Integer(required=True)
    user_id = fields.String(required=True)
    recharge_success_amount = fields.Integer(allow_none=True)


class CreateComplaintSchema(MchSignRequestSchema):
    agency_id = fields.Integer(required=True)
    mch_id = fields.Integer(required=True)
    user_id = fields.String(required=True)
    complaint_types = fields.List(EnumField(ComplaintType))
    complaint_content = fields.String()
    images = fields.List(fields.String())
